package com.yunji.storage.service.impl;

import com.yunji.storage.bo.StockTakeRemoveBO;
import com.yunji.storage.bo.StockTakeResetBO;
import com.yunji.storage.bo.StockTakeSelectQueryBO;
import com.yunji.storage.bo.StorageUpdateAuditBO;
import com.yunji.storage.dao.IStockTakeDao;
import com.yunji.storage.domain.StockTakeDO;
import com.yunji.storage.mapper.StockTakeMapper;
import com.yunji.storage.service.IStockTakeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.service.impl
 * @Title: StockTakeServiceImpl
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-08-30 10:23:17      V1.0        HuaAo       新建类
 */
@Service
public class StockTakeServiceImpl implements IStockTakeService {

    @Resource
    IStockTakeDao stockTakeDao;

    @Override
    public boolean create(StockTakeDO stockTake) {
        return stockTakeDao.create(stockTake);
    }

    @Override
    public boolean deleteByTicket(StockTakeRemoveBO bo) {
        return stockTakeDao.deleteByTicket(bo);
    }

    @Override
    public StockTakeDO select(Long stockTakeId) {
        return stockTakeDao.getById(stockTakeId);
    }

    @Override
    public StockTakeDO select(StockTakeSelectQueryBO bo) {
        return stockTakeDao.select(bo);
    }

    @Override
    public boolean delete(Long... stockTakeIds) {
        return stockTakeDao.delete(stockTakeIds);
    }

    @Override
    public boolean update(StockTakeDO update) {
        return stockTakeDao.updateTicket(update);
    }

    @Override
    public void reset(StockTakeResetBO bo) {
        stockTakeDao.reset(bo);
    }

    @Override
    public boolean updateAuditStatus(StorageUpdateAuditBO auditBO) {
        return stockTakeDao.updateAuditStatus(auditBO);
    }
}